Both macOS power keys ignore quick presses, sleep on deliberate press, and display a prompt on long-press.
